package com.louis.web.controller;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.louis.domain.DomainObject;

/**
 * <p>
 * GotoController
 * </p>
 * 
 * @author: louisjiang
 * @version: 1.0.0,Apr 26, 20125:18:41 PM
 */
@Scope("request")
@Controller("forwardRedirectController")
public class ForwardRedirectController {

	@RequestMapping(value = "/forward/{page}.html", method = RequestMethod.GET)
	public String forward(@PathVariable("page") String page) {
		DomainObject domainObject = new DomainObject();
		System.out.println("getGeneralDao=" + domainObject.getGeneralDao());
		return page;
	}

	@RequestMapping(value = { "/redirect/{page}.html" }, method = RequestMethod.GET)
	public String redirect(@PathVariable("page") String page) {
		return "redirect:" + page + ".html";
	}

}
